import { createBrowserRouter, Navigate } from 'react-router-dom'
import App from '../App'
import My from '../components/My'
import Shouy from '../components/Shouy'
import Xiaopao from '../components/Xiaopao'

import Search from '../components/SSearch'
import Detailye from '../components/Detailye'


// 登录
import Register from '../components/Register/Qidong.js'
import Login from '../components/Register/login.js'
import Qidong from '../components/Register/Qidong.js'


//消息
import Xiaoxi from '../components/Xiaoxi'
import Laotian from '../components/Xiaoxi/Liao.js'
import Qinliao from '../components/Xiaoxi/Qinliao'

import Shezhi from '../components/My/Shezhi'
import Dong from '../components/My/Dong'
import Dontai from '../components/My/Dongtai'
import Yiqipao from '../components/My/Yiqipao'
import Qunliao from '../components/My/Qunliao'
import Guan from '../components/My/Guan'
import Fans from '../components/My/Fans'
import Shouc from '../components/My/Shoucang.js'
import Zl from '../components/My/Zl.js'
import Ctai from '../components/My/Ctai'
import Cyiq from '../components/My/Cyiq'
import Shenfen from '../components/My/Shenfen.js'
import Guanyu from '../components/My/guanyu.js'
const router = createBrowserRouter([
    {
        path: '/',
        element: <App></App>,
        children: [
            {
                path: '/',
                element: <Navigate to={'/app/shouy'}></Navigate>
            },
            {
                path: '/app/shouy',
                element: <Shouy></Shouy>
            },
            {
                path: '/app/search',
                element: <Search></Search>
            },

            {
                path: '/app/xiaopao',
                element: <Xiaopao></Xiaopao>
            },
            {
                path: '/app/xiaoxi',
                element: <Xiaoxi></Xiaoxi>
            },
            {
                path: '/app/my',
                element: <My></My>,
            },
            {
                path: "/app/detailye",
                element: <Detailye />

            }
        ]
    },
    {
        path: '/app/my/guan',
        element: <Guan></Guan>,
    },
    {
        path: '/app/my/fans',
        element: <Fans></Fans>,
    },
    {
        path: '/register',
        element: <Register></Register>
    },
    {
        path: '/app/my/dong',
        element: <Dong></Dong>,
        children: [
            {
                path: '/app/my/dong/tai',
                element: <Dontai></Dontai>,
            },
            {
                path: '/app/my/dong/yiqi',
                element: <Yiqipao></Yiqipao>,
            },
            {
                path: '/app/my/dong/qunliao',
                element: <Qunliao></Qunliao>,
            }

        ]
    },
    {
        path: '/app/my/shouc',
        element: <Shouc></Shouc>,
        children: [
            {
                path: '/app/my/shouc/ctai',
                element: <Ctai></Ctai>,
            },
            {
                path: '/app/my/shouc/cyiqi',
                element: <Cyiq></Cyiq>,
            }

        ]
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '/qidong',
        element: <Qidong></Qidong>
    },
    {
        path:'/liao',
        element:<Laotian></Laotian>

    },
    {
        path: '/shez',
        element: <Shezhi></Shezhi>
    },
    {
        path: '/qliao',
        element: <Qinliao></Qinliao>
    }, {
        path: '/app/my/shenfen',
        element: <Shenfen></Shenfen>,
    },
    {
      path:"/zl",
      element:<Zl></Zl>  
    },
    {
        path: '/app/my/guanyu',
        element: <Guanyu></Guanyu>,
    }

])

export default router